using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Collections;
using System.Collections.Generic;
using System.Web.Mvc;
namespace Kunlun.Models
{
    [Bind(Exclude = "ID")]
    [Table("Consumer_library")]
      public class Consumer_library
      {

        
         public int ID { get; set; }
         [Required(ErrorMessage = "用户ID不能空")]  
         [DisplayName("用户ID")] 
         public int UserID { get; set; }
         [DisplayName("图库名称")] 
         [Required]
         [StringLength(50,ErrorMessage="最长不能超过50个字符")]
         public string LibraryName { get; set; }
         [DisplayName("图库描述")] 
         [DataType(DataType.MultilineText)]
         [Required]
         [StringLength(50, ErrorMessage = "最长不能超过500个字符")]
         public string Description { get; set; }
         [DisplayName("创建时间")] 
         public DateTime BeginDate { get; set; }
         [DisplayName("是否公开")] 
         public bool IsPub { get; set; }
         [Required(ErrorMessage = "是否可用不能空")]  
         [DisplayName("是否可用")] 
         public bool IsVisible { get; set; }
         [DisplayName("排序")]
         [RegularExpression(@"(\d+)", ErrorMessage = "只能使用数值")]
         public int Orders { get; set; }
         [DisplayName("最后修改时间")] 
         public DateTime LastUpdateTime { get; set; }
          [ForeignKey("Library")]
         public virtual ICollection<Consumer_pic> Consumer_pic { get; set; }
         } 
} 
